home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / mpfeel.lha / MPFeel / Makefile < prev    next >
Makefile  |  1992-10-07  |  9KB  |  308 lines

  1.  ###################################################################### #
  2. # The FEEL makefile...                                                   #
  3. # ###################################################################### #
  4.  
  5. #
  6. # $Id: Makefile,v 1.6 1992/02/11 19:50:01 pab Exp $
  7. #
  8. # $Log: Makefile,v $
  9. # Revision 1.6  1992/02/11  19:50:01  pab
  10. # bytecode junk
  11. #
  12. # Revision 1.5  1992/01/21  22:53:41  pab
  13. # added depend rule
  14. #
  15. # Revision 1.4  1992/01/09  23:08:00  pab
  16. # Std Version
  17. #    
  18. # Revision 1.3  1991/12/22  15:13:44  pab
  19. # Xmas revision
  20. #
  21. # Revision 1.2  1991/11/15  16:51:59  pab
  22. # new version
  23. #
  24. # Revision 1.1  1991/08/12  16:51:05  pab
  25. # Initial revision
  26. #
  27.  
  28. # Revision 1.7  1991/05/16  11:22:04  pab
  29. # 'C' garbage collector support
  30. #
  31. # Revision 1.6  1991/05/15  20:05:52  kjp
  32. # Various including /brad_export->/denton_export + hooks for building
  33. # a FEEL including compiled lisp.
  34. #
  35. # Revision 1.5  1991/02/13  21:13:56  kjp
  36. # Added rule for making a profiled version of you.
  37. #
  38. #
  39.  
  40. # Edit the following for your favourite machine.
  41. # Currently we know about clippers, sun3s, sun4s & MIPS R2000s.
  42.  
  43. # ###################################################################### #
  44. # Customisation section...                                               #
  45. # ###################################################################### #
  46.  
  47.  
  48. # Directories...
  49.  
  50. # Where the system lives (change this!)
  51.  
  52. #BASE = /net/brad/denton_export/denton/You
  53. BASE = /u0/comp/sm/MPFeel
  54.  
  55. # C compiler configuration... -DWITH_FUDGE -DWITH_PARANOIA
  56.  
  57. # Options...
  58. #
  59. #   Socketry...
  60. #     WITH_SYSTEMV_SOCKETS - System V IP communication
  61. #     WITH_BSD_SOCKETS     - BSD IP communication
  62. #
  63. #   Signals...
  64. #     WITH_SYSTEMV_SIGNALS - System V signalling
  65. #     WITH_BSD_SIGNALS     - BSD signalling
  66. # -DWITH_SYSTEMV_SOCKETS
  67.  
  68.   ###   #     # ######  ####### ######  #######    #    #     # #######
  69.    #    ##   ## #     # #     # #     #    #      # #   ##    #    #
  70.    #    # # # # #     # #     # #     #    #     #   #  # #   #    #
  71.    #    #  #  # ######  #     # ######     #    #     # #  #  #    #
  72.    #    #     # #       #     # #   #      #    ####### #   # #    #
  73.    #    #     # #       #     # #    #     #    #     # #    ##    #
  74.   ###   #     # #       ####### #     #    #    #     # #     #    #
  75.  
  76. # Hi to the poor souls trying to build this MasPar EuLisp for their own
  77. # computers. In theory life should be a lot easier for you than it was for
  78. # us. EuLisp is written in ANSI C. However on the old MAsPar's with a 
  79. # a VaxStation front end there was no ANSI compiler. SO we ported gcc and
  80. # persuaded the maspar linker mp_ld to link the gcc objects and mpl objects
  81. # together. This meant extracting files from the gcc libraries and things.
  82.  
  83. # However the VaxStation front ends are diminishing resource and
  84. # if you're lucky you should have a DECstation front end which has 
  85. # the ANSI compiler based on GCC. So you will not have the same problem
  86. # with the EuLisp code. You may have trouble with the mpl code as it is
  87. # written in the old KNR mpl and probably won't compile.
  88.  
  89. # All the extension code is in the subdirectory Plurals
  90.  
  91. PLURALS    = /u0/comp/sm/Plurals
  92.  
  93. # These are gcc options, I guess you probably won't need them
  94. # -fstrength-reduce -fdelayed-branch -finline-functions are bad ideas
  95.  
  96. OPTS= -mg -O -DNODEBUG #-gstabs 
  97.  
  98. # Have to look for header files in both directories
  99. MP_FLAGS = -I. -IPlurals
  100.  
  101. FLAGS =  ${OPTS} ${MP_FLAGS}  -DWITH_FUDGE \
  102.         -DDONT_HAVE_STDLIB_H  -DNOLOWTAGINTS
  103.  
  104. # -DWITH_NOBBLING 
  105.  
  106. # -DGNUREADLINE
  107.  
  108. CC = gcc
  109. LN = mpl_cc -Zq
  110.  
  111. LIBS =  -lmg -lX11 
  112.  
  113. # /opt/home/is/bash-1.05/readline/libreadline.a 
  114. #       -lcurses -ltermlib -ltermcap
  115.  
  116. LEX = flex
  117. YACC = bison -y -t
  118.  
  119. # Architecture and machine type...
  120.  
  121. MACHINE = ANY
  122. ARCH = vax
  123.  
  124. # Local module path
  125.  
  126. MODULE_PATH = ${BASE}/Modules/
  127.  
  128. # Semaphoring...
  129.  
  130. SEMAPHORES = SOFTWARE
  131.  
  132. # Do the business...
  133.  
  134. # ###################################################################### #
  135. # Working section...                                                     #
  136. # ###################################################################### #
  137.  
  138. LOAD_PATH_NAME = FEEL_LOAD_PATH
  139.  
  140. MACHINEABBREV = ${ARCH}
  141. DATE = `date`
  142.  
  143. # Reader specific sources...
  144.  
  145. READERSOURCES = lex.yy.c #y.tab.c alloca.c
  146.  
  147. READEROBJECTS = lex.yy.o y.tab.o #alloca.o
  148.  
  149. # Default Elvira sources...
  150.  
  151. ELVIRASOURCES = #initelv.c
  152.  
  153. ELVIRAOBJECTS = initelv.o
  154.  
  155. # Garbage collector sources
  156.  
  157. GCOBJECTS = ../CGC/gc.o remalloc.o 
  158.  
  159. # Main sources...
  160.  
  161. #SOURCES = copy.c main.c
  162.  
  163. SOURCES = copyalloc.c copy.c arith.c basic.c chars.c error.c \
  164.       main.c modules.c print.c read.c set.c streams.c \
  165.       table.c vectors.c bootstrap.c lists.c listops.c \
  166.       class.c slots.c ngenerics.c \
  167.           symboot.c modboot.c toplevel.c root.c specials.c \
  168.       calls.c ccc.c macros.c system.c semaphores.c state.c \
  169.       format.c sockets.c sio.c modops.c lamport.c bitvecs.c 
  170.  
  171. OBJECTS = copyalloc.o copy.o arith.o basic.o chars.o error.o \
  172.       main.o modules.o print.o read.o set.o streams.o \
  173.       table.o vectors.o bootstrap.o lists.o listops.o \
  174.       class.o slots.o ngenerics.o \
  175.           symboot.o modboot.o toplevel.o root.o specials.o \
  176.       calls.o ccc.o macros.o system.o semaphores.o state.o \
  177.       format.o sockets.o sio.o modops.o lamport.o bitvecs.o  #__main.o foo.o
  178.  
  179. HDRS = bootstrap.h   generics.h    modules.h     specials.h    toplevel.h \
  180.     calls.h       global.h      ngenerics.h   state.h       vectors.h \
  181.     ccc.h         lamport.h     objects.h     structs.h     version.h \
  182.     class.h       lex_global.h  root.h        symboot.h     y.tab.h      \
  183.     copy.h        listops.h     runtime.h     syssockets.h              \
  184.     defs.h        lists.h       semaphores.h  system_p.h          \
  185.     error.h       macros.h      sio.h         system_t.h    sockets.h \
  186.     format.h      modboot.h     slots.h       table.h    threads.h
  187.  
  188. COSOURCES = ${MACHINEABBREV}-switch.s 
  189.  
  190. COOBJECTS = ${MACHINEABBREV}-switch.o threads.o
  191.  
  192. DISTRIBCO = sun3-switch.s sun4-switch.s ard-switch.s clip-switch.s any-switch.s i860-switch.s \
  193.         Makefile 
  194.  
  195. KERNELLISP= defs.em extras0.em initcode.em macros0.em standard0.em
  196.  
  197. # MasPar files
  198.  
  199. # These libraries are built in the Plurals directory.
  200.  
  201. MP_LIBS = Plurals/eubang.a #Plurals/Random/random.a 
  202.  
  203. MP_SOURCES =     Plurals/eubang.c Plurals/visualise.c
  204. MP_OBJECTS =     Plurals/eubang.o Plurals/visualise.o
  205.  
  206. MP_HEADERS =     Plurals/mp_eubang.h Plurals/mp_arith.h Plurals/mp_type.h \
  207.         Plurals/constant.h
  208.  
  209. # Lisp object file
  210.  
  211. LISPOBJECTS = LispSrc/all-lisp.o
  212.  
  213. #ISOURCES = interpreter.c
  214. #IOBJECTS = interp.o
  215. # Lisp object file
  216.  
  217. LISPOBJECTS = LispSrc/all-lisp.o
  218.  
  219. you:    ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} ${ELVIRAOBJECTS} ${IOBJECTS} \
  220.     ${MP_LIBS} ${MP_OBJECTS}
  221.     -touch you
  222.     rm you
  223.     ${LN} -yinitialise_readstr -o you ${OBJECTS} ${COOBJECTS} \
  224.         ${MP_OBJECTS} ${READEROBJECTS} ${IOBJECTS} ${ELVIRAOBJECTS} \
  225.         ${MP_LIBS}  ${LIBS}
  226.     mplimit -Zq you pmem $(PMEM_SIZE)
  227.     mplimit -Zq you cmem $(CMEM_SIZE)
  228.     echo "#!/bin/sh" > mpfeel
  229.     echo FEEL_LOAD_PATH=.:$(BASE)/Modules:$(BASE)/Plurals/Modules >> mpfeel
  230.     echo "export FEEL_LOAD_PATH" >> mpfeel
  231.     echo $(BASE)/you "$*" >> mpfeel
  232.     chmod u+x mpfeel
  233.     echo 
  234.  
  235. MPFeel.tar.Z:
  236.     -cd ..
  237.  
  238.     
  239.  
  240. Plurals.tar.Z:
  241.     -tar cvf Plurals.tar Plurals/READ* Plurals/Build* Plurals/Makefile Plurals/*.[mch] Plurals/Random/Makefile Plurals/Random/*.[mh] Plurals/*.emc Plurals/Modules/*.em Plurals/header Plurals/f_head
  242.     -compress Plurals.tar
  243.     -zcat Plurals.tar.Z | tar tvf - 
  244.  
  245. proyou:    ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} ${ELVIRAOBJECTS}
  246.     ${CC} -p -o proyou ${OBJECTS} ${COOBJECTS} \
  247.                     ${READEROBJECTS} ${ELVIRAOBJECTS} ${LIBS}
  248.     echo 
  249.  
  250. elvira:    ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} 
  251.     ld -r -o feel_elvira.o ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} 
  252.     echo 
  253.  
  254. feel_elvira.o:    elvira
  255.  
  256. feel:    feel_elvira.o ${LISPOBJECTS}
  257.     (cd LispSrc; make all-lisp.o)
  258.     ecc -o feel ${LISPOBJECTS}
  259.     echo  
  260.  
  261. reader:        
  262.     ${LEX} comp.lex
  263.     ${YACC} test.yac
  264.  
  265. # Sicko bytecode hacking
  266. # preprocess explicitly, then compile the result, after stripping out
  267. # cpp control codes. Ugh. Makes debugging easier though.
  268. interp.o: interpret.c bytecodes.h interpret.h
  269.     ${CC} -E  interpret.c ${FLAGS} \
  270.          -DMACHINE_${MACHINE} \
  271.          -DMODULE_PATH=\"${MODULE_PATH}\" \
  272.          -DLOAD_PATH_NAME=\"${LOAD_PATH_NAME}\" \
  273.          -DSEMAPHORES_${SEMAPHORES} \
  274.          -DMAKE_DATE="\"${DATE}\"" \
  275.     | grep -v "^#" | sed -e 's/@@/    \
  276.     /g' > interp.c
  277.     ${CC} -c ${FLAGS} interp.c
  278.  
  279. .c.o:
  280.     ${CC} -c $< -o $*.o ${FLAGS} \
  281.          -DMACHINE_${MACHINE} \
  282.          -DMODULE_PATH=\"${MODULE_PATH}\" \
  283.          -DLOAD_PATH_NAME=\"${LOAD_PATH_NAME}\" \
  284.          -DSEMAPHORES_${SEMAPHORES} \
  285.          -DMAKE_DATE="\"${DATE}\"" 
  286.  
  287.  
  288.  
  289.  
  290. version: ${SOURCES} ${COSOURCES} ${READERSOURCES} ${ELVIRASOURCES} ${DISTRIBCO} ${HDRS} ${KERNELLISP}
  291.     rcsfreeze 
  292.  
  293. tar: ${SOURCES} ${COSOURCES} ${READERSOURCES} ${ELVIRASOURCES} ${DISTRIBCO} ${HDRS} ${KERNELLISP}
  294.     tar chf -  ${SOURCES} ${COSOURCES} ${READERSOURCES} ${ELVIRASOURCES} ${DISTRIBCO} ${HDRS} ${KERNELLISP} \
  295.       | compress > you.tar.Z
  296.  
  297. #Rather assumes that you have X...
  298. depend: ${SOURCES} ${HDRS} ${READERSOURCES} ${COSOURCES}
  299.     makedepend -s "# DO NOT DELETE THIS LINE" -- ${FLAGS} -- ${SOURCES} ${C OSOURCES}
  300.  
  301. clean:
  302.     rm ${OBJECTS} ${COOBJECTS} ${READEROBJECTS} you
  303.  
  304.  
  305. ${MACHINE}-coroutine.o:    ${MACHINE}-coroutine.s
  306.         ${CC} -c ${MACHINE}-coroutine.s
  307. # DO NOT DELETE THIS LINE
  308.